package com.xiaokai.entity;

import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

public class Student {
	private Integer sid;
	private String sname;
	private Integer sex;
	private String pic;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date birthday;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date created;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date updated;
	private List<Hobby> hobbies;
	
	private String hname;
	
	
	public Integer getSid() {
		return sid;
	}
	public void setSid(Integer sid) {
		this.sid = sid;
	}
	public String getSname() {
		return sname;
	}
	public void setSname(String sname) {
		this.sname = sname;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public String getPic() {
		return pic;
	}
	public void setPic(String pic) {
		this.pic = pic;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	public Date getUpdated() {
		return updated;
	}
	public void setUpdated(Date updated) {
		this.updated = updated;
	}
	public List<Hobby> getHobbies() {
		return hobbies;
	}
	public void setHobbies(List<Hobby> hobbies) {
		this.hobbies = hobbies;
	}
	@Override
	public String toString() {
		return "Student [sid=" + sid + ", sname=" + sname + ", sex=" + sex + ", pic=" + pic + ", birthday=" + birthday
				+ ", created=" + created + ", updated=" + updated + ", hobbies=" + hobbies + ", hname=" + hname + "]";
	}
	public Student() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Student(Integer sid, String sname, Integer sex, String pic,
			Date birthday, Date created, Date updated, List<Hobby> hobbies) {
		super();
		this.sid = sid;
		this.sname = sname;
		this.sex = sex;
		this.pic = pic;
		this.birthday = birthday;
		this.created = created;
		this.updated = updated;
		this.hobbies = hobbies;
	}
	public String getHname() {
		return hname;
	}
	public void setHname(String hname) {
		this.hname = hname;
	}
	public Student(Integer sid, String sname, Integer sex, String pic, Date birthday, Date created, Date updated,
			List<Hobby> hobbies, String hname) {
		super();
		this.sid = sid;
		this.sname = sname;
		this.sex = sex;
		this.pic = pic;
		this.birthday = birthday;
		this.created = created;
		this.updated = updated;
		this.hobbies = hobbies;
		this.hname = hname;
	}
	

}
